package com.example.MyReflection.Service.impl;

import com.example.Annotation.AutoWired;
import com.example.Annotation.Bean;
import com.example.MyReflection.Service.UserService;
import com.example.MyReflection.bean.User;
import com.example.MyReflection.dao.UserDao;
import com.example.MyReflection.dao.impl.UserDaoImpl;

/**
 * @author cc
 * @date 2021/7/30 20:27
 * @Description
 */
@Bean
public class UserServiceImpl implements UserService {
    @AutoWired
    private UserDao userDao;

    @Override
    public void login() {
        System.out.println("登录业务 service层");
    }

    @Override
    public void regist(int age,String s) {
        userDao.saveUser(new User(Integer.toString(age),s,"123",23));
        System.out.println("年龄："+age+" 姓名："+s);
        System.out.println("注册业务 service层");

    }
}
